package com.ruoyi.system.initial;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author JerryLu
 * @date 2025/4/30 17:14
 * @description 初始化服务启动
 */
@Component
//@Order(1)
public class LocalTransaction implements CommandLineRunner {

    private final UserInfoThread infoThread;
    private final StationMapThread mapThread;

    public LocalTransaction(UserInfoThread infoThread, StationMapThread mapThread) {
        this.infoThread = infoThread;
        this.mapThread = mapThread;
    }

    @Override
    public void run(String... args) throws Exception {
        //开始启动相关服务
        this.infoThread.execute();
        this.mapThread.execute();
    }
}
